# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pdfminer
_pkgname=pdfminer
pkgver=20140328
pkgrel=4
pkgdesc='A tool for extracting information from PDF documents.'
arch=('any')
url='https://github.com/euske/pdfminer/'
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('8abb2328f7824ee980df0ce42d758c15534e97379ea9213b4aa1d29864d24d73c9e2d6020964e9ab734c0c6f7d1ae70bccbd6605168eaadf83923718a1f4849a')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  for i in "$pkgdir/usr/bin/"*; do
    mv $i "${i}2"
  done
}

